package org.dromara.trace.domain.bo;

import org.dromara.trace.domain.TraceCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 溯源码业务对象 trace_code
 *
 * @author Robin
 * @date 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TraceCode.class, reverseConvertGenerate = false)
public class TraceCodeBo extends BaseEntity {

    /**
     * 溯源码ID
     */
    @NotNull(message = "溯源码ID不能为空", groups = { EditGroup.class })
    private Long codeId;

    /**
     * 产品ID
     */
    @NotNull(message = "产品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sellproId;

    /**
     * 溯源版本ID
     */
    @NotNull(message = "溯源版本ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long versionId;

    /**
     * 溯源码
     */
    @NotBlank(message = "溯源码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String traceCode;

    /**
     * 溯源链接
     */
    @NotBlank(message = "溯源链接不能为空", groups = { AddGroup.class, EditGroup.class })
    private String traceUrl;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 状态 1可用 2不可用 trace_status
     */
    @NotBlank(message = "状态 1可用 2不可用 trace_status不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderNum;


}
